package com.sabm.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.dao.DataAccessException;
import org.springframework.security.core.userdetails.UserDetails;
import org.springframework.security.core.userdetails.UserDetailsService;
import org.springframework.security.core.userdetails.UsernameNotFoundException;
import org.springframework.stereotype.Service;

import com.sabm.model.Account;
@Service
public class UserDetailService implements UserDetailsService{
	@Autowired
	DatabaseService dbs;
	 @Override
	public UserDetails loadUserByUsername(String username)
			throws UsernameNotFoundException, DataAccessException {
		// TODO Auto-generated method stub
		 Account account = dbs.getAccountByUsername(username);
		return account;
	}
}
